home *** CD-ROM | disk | FTP | other *** search
- Path: lince.lander.es!news
- From: piqueras@lander.es (Alvaro Piqueras)
- Newsgroups: comp.lang.c
- Subject: Re: warning: possibly incorrect assignment
- Date: Sat, 20 Jan 1996 01:14:56 GMT
- Organization: Lander Internet
- Message-ID: <31004209.2723565@news.lander.es>
- References: <Pine.OSF.3.91.960109091920.6447A-100000@io.UWinnipeg.ca>
- NNTP-Posting-Host: ppp003.lander.es
- X-Newsreader: Forte Agent .99c/16.141
-
- Bill Simpson <wsimpson@uwinnipeg.ca> wrote:
-
- >I get the above warning when I compile code using the following
- >function. It flags the **** line.
-
- >**** while(fp=fopen(file_name,"r"))
-
- >How can I write this code so the compiler does not issue this warning?
-
- Try:
-
- while(( fp = fopen( file_name,"r" )) != NULL );
-
- It *should* work...
-
- cheers.
-
- Alvaro.
-
-